<include file="Public:header"/>
<form action="" method="post" class="ajax-form">
<div class="form_data">
	<div class="mod_name">
		<span class="name">
			<eq name="info.id" value="">添加<else/>修改</eq>
		</span>
	</div>
	
	<div class="mod_data">
		<div class="name">标题</div>
		<div class="input_data">
			<input type="text" name="title" value="{$info['title']}" datatype="*">
		</div>
	</div>

	<eq name="info" value="">
		<neq name="_city_id" value="">
			<input type="hidden" name="city_id" value="{$_city_id}">
			<input type="hidden" name="province_id" value="{$_province_id}">
		</neq>
	</eq>
	<eq name="_city_id" value="">
		<div {:D('Role')->is_acl('show_city_field?type=' . $type)}>
			{:W('Plugin/area_select', array('所属城市', 1, 0))}
		</div>
	</eq>

	<div {:D('Role')->is_acl('show_category_field?type=' . $type)}>
		{:W('Plugin/category_select', array('类别', 'category_id', $type, 0, 1))}
	</div>
	
	<div class="mod_data">
		<div class="name">打开类型</div>
		<div class="input_data">
			<select name="open_type">
				<php>
					$open_type_list = C('BANNER_OPEN_TYPE');
					$open_type_list_new = $open_type_list[$type];
					$open_type_list_new = $open_type_list_new ? $open_type_list_new : $open_type_list['default'];
				</php>
				<volist name="open_type_list_new" id="name">
				<option value="{$key}" <eq name="info.open_type" value="$key">selected</eq>>{$name}</option>
				</volist>
			</select>
		</div>
	</div>

	<div class="mod_data">
		<div class="name">打开参数</div>
		<div class="input_data">
			<input type="text" name="open_content" value="{$info['open_content']}">
			详情的则填写对应ID，URL链接则填写带http开头的URL地址
		</div>
	</div>

	{:W('Plugin/upload_file', array('images_id', 'img', '图片', get_type_desc($type . '_desc', 'BANNER_OPEN_TYPE'), 0, '', 1))}

	<div class="mod_data">
		<div class="name">描述说明</div>
		<div class="input_data">
			<textarea name="description" class="w400 h100">{$info['description']}</textarea>
		</div>
	</div>

	<div class="mod_submit">
		<input type="hidden" name="admin_id" value="{$_user_id}">
		<input type="hidden" name="id" value="{$info['id']}">
		<input type="hidden" name="type" value="{$type}">
		<button type="submit" class="btn btn-save">保存</button>
		<button type="reset" class="btn btn-reset">重置</button>
		<button class="btn btn-back">返回</button>
	</div>
</div>
</form>
<include file="Public:footer"/>